package org.garden.auto.bean;

import org.springframework.stereotype.Component;
import org.springframework.stereotype.Controller;
import org.springframework.stereotype.Repository;
import org.springframework.stereotype.Service;

@Component(value = "user")//等于<bean id="user" class="org.garden.auto.bean.User"/>
//@Service
//@Repository
//@Controller这些注解都一样的都是代表bean
public class User {
    private String name;

    @Override
    public String toString() {
        return "User{" +
                "name='" + name + '\'' +
                '}';
    }
}
